const Webpack = require("webpack");
const WebPackDevServer = require("webpack-dev-server");
const WebPackConfig = require("./webpack.dev.config.js");

const comipler = Webpack(WebPackConfig);
const server  =new WebPackDevServer(compiler,{
    contentBase: path.join(__dirname,'./dist'),
    port: 9000,
    inline: true,
    hot: true,
    compress: true,//进行gzip压缩
    historyApiFallback: true
});
server.listen(9000, "localhost", function() {
	console.log("Starting server on http://localhost:9000");
});
